@model DetailsImageViewModel

@{
	ViewBag.Title = Resources.Shared.AppName + " - " + string.Format(Resources.Shared.DetailsViewTitle, Model.IdentityDescription);
}

<div class="view-container">
  <div class="view-header-container">
    <h2 class="view-header">@string.Format(Resources.Shared.DetailsViewTitle, Model.IdentityDescription)</h2>
  </div>

  <!-- Top buttons -->
  <div class="view-button-container top-button-container">
    <input type="button" class="button back-button" title="@Resources.Shared.Back" onclick="window.location='@Url.Action("Index", "Image")'"/>
  </div>
  <!-- Detail begin -->
  <div class="entity-form-container">
    <fieldset>
	  <legend>@Resources.ImageResources.Image</legend>
	  <div class="form">
			<div class="field">
			  <div class="label">
				<b>
				  @Html.Label(Resources.ImageResources.Name):
				</b>
			  </div>
			  <div class="editor">
				@Html.DisplayFor(model => model.Name)
			  </div>
			</div>
			<div class="field">
			  <div class="label">
				<b>
				  @Html.Label(Resources.ImageResources.Description):
				</b>
			  </div>
			  <div class="editor">
				@Html.DisplayFor(model => model.Description)
			  </div>
			</div>
			<div class="field">
			  <div class="label">
				<b>
				  @Html.Label(Resources.ImageResources.SortOrder):
				</b>
			  </div>
			  <div class="editor">
				@Html.DisplayFor(model => model.SortOrder)
			  </div>
			</div>
			<div class="field">
			  <div class="label">
				<b>
				  @Html.Label(Resources.ImageResources.Data):
				</b>
			  </div>
			  <div class="editor">
				<a href="@Url.Action("DownloadBinary", "Image")/@Model.Id?p=Data" target="_blank">
					@if (Model.DataIsImage)
                    {
                    <img src="@Url.Action("DownloadBinary", "Image")/@Model.Id?p=Data" alt="Data" />
                    }
                    else
                    {
					    @(Resources.Shared.Download)
                    }
				</a>			
			  </div>
			</div>
			<div class="field">
			  <div class="label">
			    <b>
				  @Html.LabelFor(model => model.Product):
				</b>
			  </div>
			  <div class="editor">
				@if (Model.Product != null)
				{
					@Model.Product.IdentityDescription
				}
			  </div>
			</div>
		</div>
      </fieldset>
    </div>
	<!-- Detail end -->
 
</div>
@section scripts{
<script type="text/javascript">
</script>
}
